<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<title>CMSIS-DAP: DAP_JTAG_Transfer</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
</script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { searchBox.OnSelectItem(0); });
</script>
<link href="cmsis.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 46px;">
  <td id="projectlogo"><img alt="Logo" src="CMSIS_Logo_Final.png"/></td>
  <td style="padding-left: 0.5em;">
   <div id="projectname">CMSIS-DAP
   &#160;<span id="projectnumber">Version 1.00 - Beta</span>
   </div>
   <div id="projectbrief">CMSIS-DAP Interface Firmware for CoreSight Debug Access Port</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<div id="CMSISnav" class="tabs1">
    <ul class="tablist">
      <li class="current"><a href="../../DAP/html/index.html"><span>DAP</span></a></li>
    </ul>
</div>
<!-- Generated by Doxygen 1.8.1 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="modules.html"><span>Reference</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('group___d_a_p___u_s_b__jtag__trans.html','');});
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Groups</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Pages</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="headertitle">
<div class="title">DAP_JTAG_Transfer</div>  </div>
<div class="ingroups"><a class="el" href="group___d_a_p___u_s_b__jtag__gr.html">JTAG Commands</a></div></div><!--header-->
<div class="contents">

<p>Read/Write Single/Multiple Registers via JTAG.  
<a href="#details">More...</a></p>
<p>Read/Write Single/Multiple Registers via JTAG. </p>
<p>Register access is a single 32-bit register Read or Write. Register address depends on the DPBANKSEL/APBANKSEL and A<a href="A[1..0] = 0">3..2</a>. The command can execute several read/write operations on DP/AP registers. Response is in the same order as request but might be shorter in case of errors. <br/>
 <br/>
 Transfer is aborted on the following errors:</p>
<ul>
<li>Target WAIT responses exceed configured value</li>
<li>Value Mismatch (Read Register with Value Match)</li>
</ul>
<p>Command to <b>request</b> the JTAG transfer. </p>
<div class="fragment"><div class="line">  BYTE | BYTE ******| BYTE **********| BYTE *************| WORD *********|</div>
<div class="line">&gt; 0x25 | JTAG Index | Transfer Count | Transfer Request  | Transfer Data |</div>
<div class="line"> ******|************|****************|+++++++++++++++++++|+++++++++++++++|</div>
</div><!-- fragment --><p><b>Respons</b> to the JTAG dat transfer request. </p>
<div class="fragment"><div class="line">  BYTE | BYTE **********| BYTE *************| WORD *********|</div>
<div class="line">&lt; 0x25 | Transfer Count | Transfer Response | Transfer Data |</div>
<div class="line"> ******|****************|*******************|+++++++++++++++|</div>
</div><!-- fragment --><p><b>Where</b> </p>
<ul>
<li><b>JTAG Index</b>: Zero based JTAG index of selected device</li>
</ul>
<ul>
<li><b>Transfer Count</b>: Number of transfers: 1..255<ul>
<li>Host requests the number of transfers.</li>
<li>Target responds with actual number of transfers executed. <br/>
</li>
</ul>
</li>
</ul>
<ul>
<li><b>Transfer Request</b>: Contains information about requested access from host<ul>
<li><b>Bit0:</b> APnDP 0 := DP (Debug Port) 1 := AP (Access Port)</li>
<li><b>Bit1:</b> RnW 0 := Write Register 1 := Read Register</li>
<li><b>Bit2:</b> A2 := Register Address bit 2</li>
<li><b>Bit3:</b> A3 := Register Address bit 3</li>
<li><b>Bit4:</b> Value Match (only valid for Read Register) 0 := Normal Read Register 1 := Read Register with Value Match Bit5: Match Mask (only valid for Write Register) 0 := Normal Write Register 1 := Write Match Mask (instead of Register) <br/>
</li>
</ul>
</li>
</ul>
<ul>
<li><b>Transfer Response</b>: Contains information about response from target<ul>
<li><b>Bit2</b>..0: ACK (Acknowledge) <br/>
 001B - WAIT <br/>
 010B - OK/FAULT <br/>
</li>
<li><b>Bit4:</b> Value Mismatch (Read Register with Value Match)</li>
</ul>
</li>
</ul>
<ul>
<li><b>Transfer Data</b>: Register value and optional match items<ul>
<li><b>Write Register</b>:<ul>
<li><b>Request:</b> <div class="fragment"><div class="line"> WORD ***********|</div>
<div class="line">&gt; Register Value |</div>
<div class="line"> ****************|</div>
</div><!-- fragment --> <br/>
</li>
<li><b>Response:</b> No Data <br/>
 <br/>
</li>
</ul>
</li>
<li><b>Read Register</b>:<ul>
<li><b>Request:</b> No Data</li>
<li><b>Response:</b> <div class="fragment"><div class="line"> WORD ***********|</div>
<div class="line">&gt; Register Value |</div>
<div class="line"> ****************|</div>
</div><!-- fragment --> <br/>
 <br/>
</li>
</ul>
</li>
<li><b>Write Match Mask</b>:<ul>
<li><b>Request:</b> <div class="fragment"><div class="line">  WORD ******|</div>
<div class="line">&gt; Match Mask |</div>
<div class="line"> ************|</div>
</div><!-- fragment --></li>
<li><b>Response:</b> No Data <br/>
 <br/>
</li>
</ul>
</li>
<li><b>Read Register with Value Match</b>:<ul>
<li><b>Request:</b> <div class="fragment"><div class="line">  WORD *******|</div>
<div class="line">&gt; Match Value |</div>
<div class="line"> *************|</div>
</div><!-- fragment --></li>
<li><b>Response:</b> No Data </li>
</ul>
</li>
</ul>
</li>
</ul>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="footer">Generated on Wed May 30 2012 10:29:10 for CMSIS-DAP by ARM Ltd. All rights reserved.
	<!--
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.1 
	-->
	</li>
  </ul>
</div>
</body>
</html>
